package ru.samgtu.wst.plugin;

import ru.samgtu.wst.model.Request;
import ru.samgtu.wst.model.Response;

public class ScriptableConversation {

	private Request _request;
	private Response _response;
	private String _origin;

	private boolean _cancelled = false;
	private boolean _analyse = true;

	/** Creates a new instance of ScriptableConversation */
	public ScriptableConversation(Request request, Response response,
			String origin) {
		_request = request;
		_response = response;
		_origin = origin;
	}

	public Request getRequest() {
		return new Request(_request); // protective copy
	}

	public Response getResponse() {
		return new Response(_response); // protective copy
	}

	public String getOrigin() {
		return _origin;
	}

	public void setCancelled(boolean cancelled) {
		_cancelled = cancelled;
	}

	public boolean isCancelled() {
		return _cancelled;
	}

	public void setAnalyse(boolean analyse) {
		_analyse = analyse;
	}

	public boolean shouldAnalyse() {
		return _analyse;
	}

}
